<script type="text/javascript" src="data.js"></script>
<script type="text/javascript">
function GetChormeInnerHTML(nodes) // 得到选择区域的内容
{
    var node = null;
    var Atitle = new Array();
    var Aurl = new Array();
    for ( var i = 0; i < nodes.length; i++) {
        node = nodes[i];
        if (node.tagName == "A") {
            if (node.textContent != "" && node.href != "") {
                Atitle.push(node.textContent);
                Aurl.push(node.href);
            }
        }
        if (node.childNodes.length > 0) {
            var aa = node.getElementsByTagName("A");
            for ( var j = 0; j < aa.length; j++) {
                if (aa[j].textContent != "" && aa[j].href != "") {

                    Atitle.push(aa[j].textContent);
                    Aurl.push(aa[j].href);
                }
            }
        }
    }
    MysetItem("Arraytitle", eval(Atitle));
    MysetItem("Arrayurl", eval(Aurl));
}




if(document.all)
{
    
	//url = "kx1.html?";
	url = "mainpage.html#tabs-2";
    var sel = window.getSelection().getRangeAt(0); // 得到选择区域
    GetChormeInnerHTML(sel.cloneContents().childNodes);
	window.open(url);
}
else
{
	url = "mxaddon-pkg://{d2ab4874-eed1-416c-a11e-a5c3374e8e9f}/web/mainpage.html#tabs-2";
	var sel = window.getSelection().getRangeAt(0);
	GetChormeInnerHTML(sel.cloneContents().childNodes);
	window.open(url);
}
		
</script>
